<? include("includes/functions.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title><!-- Title --></title>
	<meta name="Description" content="">
	<meta name="Keywords" content="">
	<meta name="Author" content="UpStart Productions :: Portland OR :: info@UpStart-Productions.com">
	<link rel="STYLESHEET" href="styles/layout.css">
</head>

<body>
<h1>Generating Site Map</h1>
<?
// Open File
$xmlFileHandle = fopen("sitemap.xml","w");

// Generate XML
$xml  = '<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">';

// Generate Dynamic Content
// Get main menu items
$sql = "SELECT Path from transLinks GROUP BY Path";
$result = mysql_db_query($dbname,$sql);

while ($value = mysql_fetch_assoc($result)) {
	$path = $value[Path];
	
	$xml .= '
<url>
	<loc>http://www.tcntransition.org'.$path.'</loc>
	<changefreq>yearly</changefreq>
	<priority>0.9</priority>
</url>';

}

// Static Content
$xml .= '
<url>
	<loc>http://www.tcntransition.org/contact.php</loc>
	<changefreq>monthly</changefreq>
	<priority>0.5</priority>
</url>
<url>
	<loc>http://www.tcntransition.org/about.php</loc>
	<changefreq>yearly</changefreq>
	<priority>0.5</priority>
</url>
<url>
	<loc>http://www.tcntransition.org/resourceAdd.php</loc>
	<changefreq>monthly</changefreq>
	<priority>0.5</priority>
</url>
<url>
	<loc>http://www.tcntransition.org/conferences.php</loc>
	<changefreq>monthly</changefreq>
	<priority>0.6</priority>
</url>
<url>
	<loc>http://www.tcntransition.org/siteMap.php</loc>
	<changefreq>monthly</changefreq>
	<priority>0.9</priority>
</url>
<url>
	<loc>http://www.tcntransition.org/newsletters.php</loc>
	<changefreq>yearly</changefreq>
	<priority>0.5</priority>
</url>
<url>
	<loc>http://www.tcntransition.org/serviceProviders.php</loc>
	<changefreq>monthly</changefreq>
	<priority>0.5</priority>
</url>
';

$xml .= '</urlset>';

// Close File
fwrite($xmlFileHandle, $xml);
fclose($xmlFileHandle);
?>
</body>
</html>